#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>
int main()
{
  extern char**environ;
  for(int i=0;environ[i];i++)
  {
    printf("environ[%d]:%s\n",i,environ[i]);
  }

  return 0;
}
//int main()
//{
//  const char*username=getenv("USER");
//  if(strcmp(username,"user100")==0)
//  {
//    printf("this is my own code\n");
//  }
//  else 
//  {
//    printf("you can't see the code\n");
//  }
//  return 0;
//}
//int main(int argc,char* argv[])
//{
//  if(argc!=4)
//  {
//    printf("Usage: %s -[add/sub/mul/div] a b\n",argv[0]);
//    return 1;
//  }
//  int a=atoi(argv[2]);
//  int b=atoi(argv[3]);
//  if(strcmp(argv[1],"-add")==0)
//  {
//    printf("%d+%d=%d\n",a,b,a+b);
//  }
//  else if(strcmp(argv[1],"-sub")==0)
//  {
//    printf("%d-%d=%d\n",a,b,a-b);
//  }
//  else if(strcmp(argv[1],"-mul")==0)
//  {
//    printf("%d*%d=%d\n",a,b,a*b);
//  }
//  else if(strcmp(argv[1],"-div")==0)
//  {
//    printf("%d/%d=%d\n",a,b,a/b);
//  }
//  else printf("Unknown\n");
//
//  return 0;
//}
///int main(int argc,char*argv[])
///{
///  if(argc!=2)
///  {
///    printf("Usage: %s -number[1-3]\n",argv[0]);
///    return 1;
///  }
///  if(strcmp("-1",argv[1])==0)
///  {
///    printf("function 1\n");
///  }
///  else if(strcmp("-2",argv[1])==0)
///  {
///    printf("function 2\n");
///  }
///  else if(strcmp("-3",argv[1])==0)
///  {
///    printf("function 3\n");
///  }
///  else{
///    printf("Unknown\n");
///  }
  //for(int i=0;argv[i];i++)
  //{
  //  printf("%s\n",argv[i]);
  //}
  //for(int i=0;i<argc;i++)
  //{
  //  printf("%s\n",argv[i]);
  //}
  //return 0;
//}

//int main()
//{
//  pid_t id=fork();
//  if(id==0)
//  {
//    //child
//    int cnt=60;
//    while(cnt)
//    {
//      printf("I am child,pid:%d,ppid:%d\n",getpid(),getppid());
//      sleep(1);
//      cnt--;
//    }
//    exit(0);
//  }
//  //father
//  int c=5;
//  while(c--)
//  {
//      printf("I am father,pid:%d,ppid:%d\n",getpid(),getppid());
//      sleep(1);
//  }
//  return 0;
//}
////int main()
////{
//while(1)
//{
//sleep(1);
//printf("pid is%d\n",getpid());
//}
//  return 0;
//}
